1. Field of the Invention
The present invention relates to an image pickup apparatus, a storing method of image data in the image pickup apparatus and a storage medium thereof, and more particularly to a storing procedure of storing the image data to a filing system in the image pickup apparatus and protection of the filing system.
2. Related Background Art
There has been known an image pickup apparatus which temporarily stores image data in a first storage means after converting a digitized image signal, to which digital signal processing is executed, into desired format image data, and then stores the image data in a detachable second storage means (hereinafter, called storage medium) for finally storing the image data.
In the image pickup apparatus structured as above, the detachable storage medium is divided into a first area and a second area. The first area is used as a management area for managing image data files. The second area is used as a data area (cluster area) for storing image data themselves of the image data files. The filing system is structured by the above-mentioned file management area and the data area.
Image data obtained by performing a shooting operation is temporarily stored in a main memory. The image data temporarily stored in the main memory is stored in the storage medium asynchronously with the shooting operation as an image file format.
In a conventional image pickup apparatus, a writing operation of writing the image data files in the storage medium is performed in accordance with a procedure in a flow chart shown in FIG. 7. It should be noted that FIG. 8 is an explanation view which indicates timing and a processing procedure of writing the files from the main memory for temporarily storing plural image data to a final storage medium.
Initially, when the shooting operation is performed, a file writing task 600 is started, and image data to be recorded is registered in this task (step S601).
Then, it is judged whether or not the image data is registered (step S602). If the image data is not registered, the flow returns to the step S601. If the image data is registered, FAT (file allocation table) information is read from a management area 210 on the main memory (step S603), and a blank area (blank cluster area) is searched.
Subsequently, data of the cluster for storing a directory entry of the image data file is read on the main memory (step S604), the directory entry of the image data file to be added is written, and the cluster data is rewritten to an origin cluster (step S605), thereby performing an update of the FAT and writing of the FAT (step S606) (state that a file is formed on a storage medium) (operation (1) in FIG. 8).
Next, in order to write the image data itself on the storage medium (operation (7) in FIG. 8), a blank cluster area is searched from the FAT information read on the main memory, and the FAT information (link information of FAT) on the main memory is updated (step S608) while sequentially writing the image data itself to the corresponding blank cluster area on the storage medium (step S607).
Next, it is judged whether or not the data is in an end state (step S609). When the image data itself is completely written on the storage medium, a FAT entry (link information to a first cluster) in the directory entry of the image data file preserved on the main memory is set, size of the image file is set (step S610), and the cluster data including this directory entry is rewritten to the origin cluster (step S611).
(State that a file is formed on the storage medium, link information of the FAT is defined, and image file size is also defined.) Finally, the updated FAT information on the main memory is rewritten to a predetermined management area in the storage medium (step S612), thereby terminating a series of file writing operations (operation (2) in FIG. 8).
In the conventional image pickup apparatus, if sequential shooting operations are performed, plural image data are accumulated on a main memory (700) and a cycle of forming the image data, data writing and a file close is repeated as indicated by timing written in a storage medium 710 when the plural shot data are sequentially written to the storage medium as image files. (refer to FIG. 8)
By the way, size of the image data in the image pickup apparatus tends to increase with the increase of the number of pixels in a pickup element. In order to improve capability in high-speed shooting of the image pickup apparatus or shorten a shooting interval, large image data is temporarily stored in the main memory of large capacity (700), and the large image data (plural image data) are to be sequentially written to the final storage medium (710).
Generally, writing speed to the storage medium can not catch up to the shooting operation because of the improvement of capability in the high-speed shooting or shortening of the shooting interval. In case of utilizing a storage medium of slow speed writing, image data which is not written and remained in the main memory is written to the storage medium for several seconds after performing the shooting operation.
Therefore, there is sufficient possibility that a user of the image pickup apparatus detaches the storage medium from the image pickup apparatus or extracts a power supply unit (battery) by assuming that the image data was written in a file when the shooting operation was terminated.
Since the image data files are sequentially written to the storage medium, writing of management information of the image file is performed until writing the image data stored in the main memory to the file is terminated after terminating the shooting operation (operations (2), (4) and (6) indicated as timing written in the storage medium 710 in FIG. 8).
Therefore, there is sufficient possibility that the filing system on the storage medium is destructed because the user of the image pickup apparatus erroneously detaches the storage medium or extracts the battery in process of writing the management information of the image file. In an area where the management information is recorded, since management information for managing another image is also stored, there was a risk of disabling to access to another image data before shot because the filing system itself is destructed owing to the above-mentioned erroneous operation.
That is, after terminating the shooting operation, if a storage medium 105 is detached until timing of the operation (6) written in the storage medium 710 shown in FIG. 8 (file close of final image data 3), there is possibility of destructing the filing system.
Since remaining capacity of the battery is in a low level, all of the image data can not be written to the storage medium and the power is down in process of writing the management information of the image file. Therefore, also, there was sufficient possibility of destructing the filing system.
Conventionally, for the above-mentioned possibility, there considered a method of giving an attention to the user of the image pickup apparatus using an instruction manual or backing up the image data not written on the main memory.
However, there sometimes occurred a problem that the user of the image pickup apparatus erroneously detaches the storage medium or extracts the battery. Furthermore, in order to back up the image data on the main memory, since the large power is consumed, the backup system unfitted to a compact image pickup apparatus.
As described above, size of the image data in the image pickup apparatus tends to increase with the increase of the number of pixels in the pickup element. In accordance with the improvement of capability in the high-speed shooting of the image pickup apparatus or shortening of the shooting interval, large image data is temporarily stored in the main memory, and the large image data (plural image data) are sequentially written to the storage medium.
However, writing speed to the storage medium can not catch up to the shooting operation because of the improvement of capability in the high-speed shooting or shortening of the shooting interval. In case of utilizing the storage medium of slow speed writing, the image data which is not written and remained in the main memory is written to the storage medium for several seconds after performing the shooting operation.
There is sufficient possibility that the user of the image pickup apparatus detaches the storage medium from the image pickup apparatus or extracts the battery by assuming that the image data was written in the file when the shooting operation was terminated.
However, in a conventional operation of writing the image file, since the writing of the management information of the image file is performed until writing the image data stored in the main memory to the file is terminated after terminating the shooting operation, there is sufficient possibility that the filing system on the storage medium is destructed because the user of the image pickup apparatus erroneously detaches the storage medium or extracts the battery in process of writing the management information of the image file.
As mentioned above, when the filing system is destructed, there was a problem of disabling to access to the image data which is before shot. If the storage medium is extracted before reaching a predetermined timing after terminating the shooting operation, there was possibility of destructing the filing system.
Also, there was sufficient possibility of destructing the filing system since remaining capacity of the battery is in a low level, all of the image data can not be written to the storage medium and the power is down in process of writing the management information of the image file.
Conventionally, for the above-mentioned possibility, there considered a method of giving an attention to the user of the image pickup apparatus using an instruction manual or backing up the image data not written on the main memory. However, the above-mentioned method does not correspond to a complete coping method of preventing the destruction of the filing system.
Furthermore, in order to back up the image data on the main memory, since the large power is consumed, the backup system slightly unfitted to the compact image pickup apparatus.